package com.alibaba.ai.controller;

import com.alibaba.ai.service.StateService;
import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 王振东
 */
//@Controller
@RestController
@RequestMapping("/index7")
public class StateController {
    //小区房价
//    @Resource
    @Autowired
    private StateService stateService;

    @ResponseBody
//    @RequestMapping("/hode")
    public List<JSONObject> State(){
        List<JSONObject> list =stateService.getlist();
        return list;
    }

}
